#include "DataStruct.fxh"
#include "States.fxh"

Texture1D texColorBar;         //1D texture for color bar

VS_OUTPUT_POSTEX RenderFullScreenQuadVS(VS_INPUT_VERTTEX InVert)
{
	VS_OUTPUT_POSTEX Output;
	Output.Position = float4(InVert.Pos, 1.0f);
	Output.TextureUV = InVert.TextureUV;
	return Output;
}

float4 RenderFullScreenQuadPS(VS_OUTPUT_POSTEX In):SV_TARGET
{
	return texColorBar.Sample(LinearSampler_Clamp, 1.0-In.TextureUV.y); //vertically disply --> using .y
}

//--------------------------------------------------------------------------------------
// Renders quad 
//--------------------------------------------------------------------------------------
technique11 RenderFullScreenQuad
{
    pass P0
    {        
		SetRasterizerState(RenderMesh_RS);  
        SetVertexShader(CompileShader(vs_5_0, RenderFullScreenQuadVS()));
		SetGeometryShader( NULL );
        SetPixelShader(CompileShader(ps_5_0, RenderFullScreenQuadPS())); 
    }
}